//
// Created by Soar Qin on 2017/9/1.
// Copyright (c) 2017 Soar Qin. All rights reserved.
//

#pragma once

#include <event2/event.h>
#include <event2/buffer.h>

#include <list>

namespace core::async {

struct UDPPendingPacket {
    void *buf;
    size_t size;
    IPAddr addr;
};

struct UDPEndpointContext {
    struct event *evwrite = nullptr;
    std::list<UDPPendingPacket> pendings;
};

}
